package com.haoshuang.zhouzhoubang.ui.adapter

import com.chad.library.adapter4.BaseQuickAdapter
import com.haoshuang.zhouzhoubang.R
import com.haoshuang.zhouzhoubang.databinding.ItemReasonBinding
import com.haoshuang.zhouzhoubang.model.bean.ReasonBean
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter


/**
 * 订单模块中的订单列表适配器
 * */
class ReasonAdapter(data: MutableList<ReasonBean>) :
    BaseBindingQuickAdapter<ReasonBean, ItemReasonBinding>(data){

    override fun onBindViewHolder(holder: BaseBindingHolder, position: Int, item: ReasonBean?) {
        val binding = ItemReasonBinding.bind(holder.itemView)
        binding.apply {

            tvReason.text=item?.reason
            if (item?.isCheck==0){
                isCheck.setImageResource(R.mipmap.dz_wx)
            }else{
                isCheck.setImageResource(R.mipmap.dz_ok)
            }
        }
    }

}